<template>
  <el-dialog :append-to-body="true" :visible.sync="dialog" center title="二维码" width="420px">
    <div ref="form" center style="width:380px;height:380px">
      <a :href="form.qrcode_url" style="color: #42b983" target="_blank">
        <img :src="form.qrcode_url" alt="点击打开" class="el-avatar">
      </a>
    </div>
    <el-divider />
    <el-button type="primary" style="display: flex;float: right;margin: -15px 10px 10px;" @click="cancel">关闭</el-button>
  </el-dialog>
</template>

<script>
export default {
  components: { },
  data() {
    return {
      dialog: false,
      form: {
        qrcode_url: ''
      }
    }
  },
  methods: {
    cancel() {
      this.resetForm()
    },
    resetForm() {
      this.dialog = false
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  /deep/ .el-input-number .el-input__inner {
    text-align: left;
  }
.el-avatar{
  width: 380px;
  height: 380px;
}
</style>
